let arr = [
    ["name","Hydra"],
    ["age",35],
    ["sex","男"]
];

let obj1 = Object.fromEntries(arr);
console.log("obj1 =",obj1); // { name: 'Hydra', age: 35, sex: '男' }

// 可以将Map对象直接转为对象
let map = new Map();
map.set("name","Hydra");
map.set("age",35);
map.set("sex","男");
let obj2 = Object.fromEntries(map);
console.log("obj2 =",obj2); // { name: 'Hydra', age: 35, sex: '男' }